import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
import Login from './views/login/index.vue'
import ForgetPassword from './views/forgetPassword/index.vue'
import Registered from './views/registered/index.vue'
Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    name: 'home',
    component: Home,
    redirect: '/index',
    meta: {
      // requireAuth: true
    },
    children: [{
      path: 'index',
      name: 'index',
      component: () =>
                import (/* webpackChunkName: "about" */ './views/index/index.vue'),
      meta: {
        requireAuth: true
      }
    }, {
      path: 'permission',
      name: 'Permission',
      component: () =>
                import (/* webpackChunkName: "about" */ './views/Permission/index.vue'),
      meta: {
        requireAuth: true
      }
    }, {
      path: 'withdraw',
      name: 'withdraw',
      component: () =>
                import (/* webpackChunkName: "about" */ './views/withdraw/index.vue'),
      meta: {
        requireAuth: true
      }
    }, {
      path: 'share',
      name: 'share',
      component: () =>
                import (/* webpackChunkName: "about" */ './views/shareit/index.vue'),
      meta: {
        requireAuth: true
      }
    }, {
      path: 'bill',
      name: 'bill',
      component: () =>
                import (/* webpackChunkName: "about" */ './views/bill/index.vue'),
      meta: {
        requireAuth: true
      }
    }, {
      path: 'purview-rule',
      name: 'purviewrule',
      component: () =>
                import (/* webpackChunkName: "about" */ './views/purviewrule/index.vue'),
      meta: {
        requireAuth: true
      }
    }, {
      path: 'share-rule',
      name: 'sharerule',
      component: () =>
                import (/* webpackChunkName: "about" */ './views/sharerule/index.vue'),
      meta: {
        requireAuth: true
      }
    }, {
      path: 'vip-rule',
      name: 'viprule',
      component: () =>
                import (/* webpackChunkName: "about" */ './views/viprule/index.vue'),
      meta: {
        requireAuth: true
      }
    }, {
      path: 'vip-level',
      name: 'vipLevel',
      component: () =>
                import (/* webpackChunkName: "about" */ './views/vipLevel/index.vue'),
      meta: {
        requireAuth: true
      }
    }, {
      path: 'master-list',
      name: 'masterList',
      component: () =>
                import (/* webpackChunkName: "about" */ './views/masterlist/index.vue'),
      meta: {
        requireAuth: true
      }
    }]
  }, {
    path: '/login',
    name: 'Login',
    meta: {
      title: '欢迎登录'
    },
    component: Login
  }, {
    path: '/reset-password',
    name: 'ForgetPassword',
    meta: {
      title: '修改密码'
    },
    component: ForgetPassword
  }, {
    path: '/registered',
    name: 'Registered',
    meta: {
      title: '注册账号'
    },
    component: Registered
  }]
})
